package com.zxinglibrary.zxing.activity;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.widget.TextView;
import android.widget.Toast;

import com.zxinglibrary.R;


public class ResultActivity extends AppCompatActivity {
    TextView tvQrcodeResult;
    private String qrCode;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.actiivty_result);
        init();
    }

    private void init() {
        tvQrcodeResult = findViewById(R.id.tv_qrcode_result);
        if (getIntent() != null && getIntent().getExtras() != null) {
            qrCode = getIntent().getExtras().getString("qrCode");
            tvQrcodeResult.setText(qrCode);
            Toast.makeText(this, qrCode, Toast.LENGTH_SHORT).show();
        }
    }
}
